/*
 * @Author: Olivia
 * @Date: 2022-12-07 22:21:59
 * @custom_string_Olivia: Less is more
 */
import request from '@/utils/request'
// 获取评论
export const getComments = params => {
  return request({
    url: '/app/v1_0/comments',
    method: 'get',
    params
  })
}
// 对文章点赞
export const addCommentLike = target => {
  return request({
    url: '/app/v1_0/comment/likings',
    method: 'post',
    data: {
      target
    }
  })
}
// 取消对文章点赞
export const deleteCommentLike = target => {
  return request({
    url: `/app/v1_0/comment/likings/${target}`,
    method: 'delete'
  })
}
// 获取评论或评论回复
export const addComment = data => {
  return request({
    url: '/app/v1_0/comments',
    method: 'post',
    data
  })
}
